import { createRouter, createWebHashHistory } from 'vue-router'


const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: () => import('@/views/Login.vue'),
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('@/views/Home.vue'),
      children: [
        {
          path: '',
          name: 'index',
          component: () => import('@/components/Index.vue'),
        },
        {
          path: 'gymManage',
          name: 'gymManage',
          component: () => import('@/components/Manage.vue'),
        },
        {
          path: 'gymMaintain',
          name: 'gymMaintain',
          component: () => import('@/components/Maintain.vue'),
        },
        {
          path: 'profile',
          name: 'profile',
          component: () => import('@/components/Profile.vue'),
        },
        {
          path: 'usersManage',
          name: 'usersManage',
          component: () => import('@/components/UsersManage.vue'),
        },
      ]
    },
    
  ],
})

export default router
